{__NOLAYOUT__}
<!--使当前页面不走模版布局-->
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<!--suppress ALL -->
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <style>
        *{padding:0px;margin:0px}
        .per{
                width:985px;
                height:400px;
                border:0px solid red;
                text-align:center;
                line-height:20px ;
                margin:10px auto;


        }
    </style>
    <link rel="Bookmark" href="favicon.ico" >
    <link rel="Shortcut Icon" href="favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/static/admin/lib/html5.js"></script>
    <script type="text/javascript" src="/static/admin/lib/respond.min.js"></script>
    <script type="text/javascript" scr="/static/homeper/js/jquery-1.8.3.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script><![endif]-->
    <!--/meta 作为公共模版分离出去-->

    <title>个人信息</title>
    {:widget('Cate/header')}
</head>
<body>
<!--_meta 作为公共模版分离出去-->
<div class="per">
    <form  action="edit" method="post"   class="form form-horizontal" id="form-article-add" enctype="multipart/form-data" >
      <input type="hidden" name="id" value="{$val['id']}">
        <div class="row cl">
            <label class="form-label col-sm-2"><span class="c-red">*</span>名称:</label>
            <div class="formControls col-xs-1 col-sm-3">
                <input type="" class="input-text" value="{$val['user_name']}" placeholder="请填写会员名"  name="user_name">
           </div>
        </div>

        <div class="row cl">
            <label class="form-label col-sm-2"><span class="c-red">*</span>:生日</label>
            <div class="formControls col-xs-1 col-sm-3">
                <input type="" class="input-text" value="{$val['user_birth']}" placeholder="请填写生日"  name="user_birth">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>性别：</label>
            <div class="formControls col-xs-8 col-sm-3">
                <div class="radio-box">
                    <input type="radio" id="radio-1" name="user_sex" value="0" {$val.user_sex==0?'checked':''}>
                    <label for="radio-1">女</label>
                </div>
                <div class="radio-box">
                    <input type="radio" id="radio-2" name="user_sex" value="1" {$val.user_sex==1?'checked':''}>
                    <label for="radio-2">男</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>图片：</label>
            <div class="formControls col-xs-8 col-sm-3">

                <div class="layui-upload-list">
                    <img class="layui-upload-img" id="demo1" width="92px" height="92px" src="__UPLOAD__user_pic/{$val.user_pic}">
                    <p id="demoText"></p>
                </div>
                </div>
        </div>

        <div class="row cl">
            <label class="form-label col-sm-2"><span class="c-red">*</span>手机号:</label>
            <div class="formControls col-xs-1 col-sm-9">
                <input type="" class="input-text" value="{$val['user_phone']}" placeholder="请填写手机号"  name="user_phone">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-sm-2"><span class="c-red">*</span>密码:</label>
            <div class="formControls col-xs-1 col-sm-8">
                <input type="" class="input-text" value="{$val['user_pass']}" placeholder="请填写会员密码"  name="user_pass">
            </div>
        </div>
    </form>
</div>
<!--请在下方写此页面业务相关的脚本-->

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/admin/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/static/admin/static/h-ui.admin/js/H-ui.admin.page.js"></script>

<!--/_footer /作为公共模版分离出去-->
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
    $(function(){
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form-article-add").validate({
            rules:{
                user_name:{
                    required:true,

                },
                user_sex:{
                    required:true,

                },
               user_phone :{
                    required:true,
                    number:'请输入正确的电话号码',
                   length:11

                },
                user_birth:{
                    required:true,
                    dateFormat:'Y-m-d'

                },
                status:{
                    required:true,

                },
            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid",
            submitHandler:function(form) {
                //进行验证成功后的提交
                $(form).ajaxSubmit({
                    type: 'post',
                    dataType: "json",
                    url: "{(edit)}",
                    success: function (data) {
                        //alert(data.status);
                        if (data.status == 1){
                            layer.msg(data.msg, {icon: 6,time:1000}, function () {
                                var index = parent.layer.getFrameIndex(window.name);
                                parent.location.reload(); //刷新父页面
                                parent.layer.close(index);
                            });
                        }else{
                            layer.msg(data.msg, {icon: 5});
                        }
                    },
                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                    }
                });
            }
        });

    });
</script>
{:widget('Cate/footer')}
</body>
</html>
<!--/请在上方写此页面业务相关的脚本-->
